<?php
$subNav = array();
$arr = explode("/", $_SERVER['PHP_SELF']);

$domain = substr($_SERVER['PHP_SELF'], 0, strlen($arr[1]) + 1);
set_include_path("../");
include("inc/essentials.php");
include("model/questions.php");
?>
<script>
    $mainNav.set("home")
</script>
<div id="bdwrapper">
    <div id="leftcontent">
        <div class="backcontent"><a href="javascript:history.back()"><img src="img/icons/backicon.png" /><span>Giải đáp thắc mắc</span></a></div>
        <div class="clear"></div>
        <div class="contentnews">
            <div class="bigtitle">Câu Hỏi Thường Gặp</div>
            <div class="clear"></div>
            <?php
            $news = Questions::findAll();

            foreach ($news as $val) {
                ?>
                <div class="tvo_recruitment">
                    <a href="<?php //echo $this->uri->segment(1) ?>/<?php echo $val['id'] ?>" title="<?php echo $val['title'] ?>"><?php echo $val['title'] ?></a>
                    <?php echo $val['content'] ?>
                    <div class="tvo_detail"><a href="<?php //echo $this->uri->segment(1) ?>/<?php echo $val['id'] ?>" title="<?php echo $val['title'] ?>">Chi tiết >></a></div>
                </div>
                <?php
            }
//            echo $this->pagination->create_links();
            ?>
            <div class="clear"></div>
        </div>
    </div>
    <div id="rightcontent">
        <div class="searchbox">
            <div class="title">Đặt vé máy bay</div>
            <div class="line6"></div>
            <form action="http://127.0.0.1/abay/tim-kiem" method="post">
                <input type="radio" value="2" name="flightwaytype" class="sdb fl inp1" checked="checked"><span class="select label1 sdb fl" id="vl2">Khứ Hồi</span><input type="radio" value="1" name="flightwaytype" class="sdb fl inp1"><span class="label1 sdb fl" id="vl1">Một Chiều</span>
                <div class="clear"></div>
                <script language="javascript">
                    $('input[name="flightwaytype"]').click(function() {
                        value = $(this).val();
                        $('span[id="vl1"]').removeClass('select');
                        $('span[id="vl2"]').removeClass('select');
                        $('span[id="vl' + value + '"]').addClass('select');
                        if (value == 1) {
                            $('input[name="date_back"]').attr('disabled', 'disabled').val('').animate({opacity: 0.5}, 500);
                        } else {
                            $('input[name="date_back"]').removeAttr('disabled').animate({opacity: 1}, 500);
                        }
                    });
                </script>

                <span class="label2">
                    Khởi hành từ
                </span>
                <input type="text" name="go" class="input1 ac_input" autocomplete="off">
                <span class="label2">
                    Đến
                </span>
                <input type="text" name="to" class="input1 ac_input" autocomplete="off">

                <span class="label2 w50 fl">
                    Ngày xuất phát
                </span>
                <span class="label2 w50 fl">
                    Ngày xuất về
                </span>
                <div class="clear"></div>
                <input class="input1 w50 fl date hasDatepicker" name="date_go" id="dp1385203425343"><input class="input1 w50 fl date hasDatepicker" type="text" name="date_back" id="dp1385203425342">
                <div class="clear"></div>

                <span class="label2 w30 fl">
                    Người lớn
                </span>
                <span class="label2 w30 fl">
                    Trẻ em
                </span>
                <span class="label2 w30 fl">
                    Em bé
                </span>
                <div class="clear"></div>
                <select name="cboAdult" id="cboAdult" class="focus_input w30 fl">
                    <option selected="selected" value="1">1</option>
                    <option value="2">2</option>
                    <option value="3">3</option>
                    <option value="4">4</option>
                    <option value="5">5</option>
                    <option value="6">6</option>
                    <option value="7">7</option>
                    <option value="8">8</option>
                    <option value="9">9</option>
                    <option value="10">10</option>
                </select>
                <select name="cboChild" id="cboChild" class="focus_input w30 padmid fl">
                    <option selected="selected" value="0">0</option>
                    <option value="1">1</option>
                    <option value="2">2</option>
                    <option value="3">3</option>
                    <option value="4">4</option>
                    <option value="5">5</option>
                    <option value="6">6</option>
                    <option value="7">7</option>
                    <option value="8">8</option>
                    <option value="9">9</option>
                    <option value="10">10</option>
                </select>
                <select name="cboInfant" id="cboInfant" class="focus_input w30 fl">
                    <option selected="selected" value="0">0</option>
                    <option value="1">1</option>
                    <option value="2">2</option>
                    <option value="3">3</option>
                    <option value="4">4</option>
                    <option value="5">5</option>
                    <option value="6">6</option>
                    <option value="7">7</option>
                    <option value="8">8</option>
                    <option value="9">9</option>
                    <option value="10">10</option>
                </select>
                <div class="clear"></div>
                <input type="submit" value="Tìm chuyến bay" class="tvo_find">
            </form>
        </div>
        <div class="clear"></div>
        <div class="adleft">
            <img src="demo/bannerad.jpg" />
        </div>
        <div class="howto">
            <div class="title"><img src="img/icons/text.png" /><span>Tôi làm thế nào</span></div>
            <ul class="right_mnu">
                <li><a href="#" title="Liên Hệ" style="padding-left: 14px;">Liên Hệ</a></li>
                <li><a href="#" title="Thanh Toán" style="padding-left: 14px;">Thanh Toán</a></li>
                <li><a href="#" title="Xem Đơn Hàng">Xem Đơn Hàng</a></li>
            </ul>
        </div>
    </div>
    <div class="clearAll"></div>
    <ul class="listservice">
        <li><a <?php metroLink("search.php") ?>><img src="img/banner/dat-ve.jpg" width="178" height="132" /></a></li>
        <li><a <?php metroLink("search.php") ?>><img src="img/banner/thue-xe.jpg" width="178" height="132" /></a></li>
        <li><a <?php metroLink("search.php") ?>><img src="img/banner/datphong.jpg" width="178" height="132" /></a></li>
        <li><a <?php metroLink("search.php") ?>><img src="img/banner/dulich.jpg" width="178" height="132" /></a></li>
        <li><a <?php metroLink("search.php") ?>><img src="img/banner/dichvu.jpg" width="178" height="132" /></a></li>
    </ul>
</div>

<div class="clear"></div>
<div class="webfooter">
    <div id="bdwrapper">
        <!--daily-->
        <div class="ctnfooter">
            <div class="title">Danh sách đại lý</div>
            <ul>
                <li><a href="#">Đại lý miền Bắc</a></li>
                <li><a href="#">Đại lý miền Trung</a></li>
                <li><a href="#">Đại lý miền Nam</a></li>
            </ul>
        </div>
        <!--tuvan-->
        <div class="ctnfooter">
            <div class="title bgtitle">Tư vấn & Hướng dẫn</div>
            <ul>
                <li><a href="#">Liên hệ</a></li>
                <li><a href="#">Hướng dẫn thanh toán</a></li>
                <li><a href="#">Thông tin chuyển khoản</a></li>
                <li><a href="#">Hướng dẫn đặt vé</a></li>
                <li><a href="#">Câu hỏi thường gặp</a></li>
                <li><a href="#">Chăm sóc khách hàng</a></li>
                <li><a href="#">Trang tư vấn</a></li>
            </ul>
        </div>
        <!--aboutus-->
        <div class="ctnfooter">
            <div class="title bgtitle">Về chúng tôi</div>
            <ul>
                <li><a href="#">Giới thiệu về SkyExpress</a></li>
                <li><a href="#">Các đơn vị hợp tác</a></li>
                <li><a href="#">Cơ hội hợp tác</a></li>
                <li><a href="#">Cấu trúc trang web</a></li>
                <li><a href="#">Tin tức</a></li>
            </ul>
        </div>
        <!--contact-->
        <div class="colcontact">
            <div class="phone mrgbtm">
                <div class="iconlist"><img src="img/icons/contactlist.png" /></div>
                <div class="infolist">
                    <div><span class="location">Toàn quốc</span><span>04.3533.3338</span></div>
                    <div><span class="location">Hà Nội</span><span>04.3533.3338</span></div>
                    <div><span class="location">Sài Gòn</span><span>04.3533.3338</span></div>
                </div>
            </div>
            <div class="clear"></div>
            <!--Chat-->
            <div class="iconlist mrgbtm"><img src="img/icons/chat.png" /><span>skyexpress</span></div>
            <div class="clear"></div>
            <!--mail-->
            <div class="iconlist mrgbtm"><img src="img/icons/mai1.png" /><span>Contact@skyexpress.vn</span></div>
            <div class="clear"></div>
        </div>
    </div>
    <div class="clear"></div>
    <div class="copyright">
        <div class="fl">© 1996-2013, skyexpress.vn</div>
        <div class="fl" style="margin-left:145px;"><a href="#">Đặt vé</a>  /   <a href="#">Đặt phòng</a>   /    <a href="#">Thuê xe</a>   /   <a href="#">Giới thiệu</a> / <a href="#">Quản lý</a></div>
        <div class="logobtm"><img src="img/icons/logobtm.png" /></div>
    </div>
    <div class="clear"></div>
</div>
